﻿'
' DotNetNuke® - http://www.dotnetnuke.com
' Copyright (c) 2002-2010
' by DotNetNuke Corporation
'
' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
' documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 
' to permit persons to whom the Software is furnished to do so, subject to the following conditions:
'
' The above copyright notice and this permission notice shall be included in all copies or substantial portions 
' of the Software.
'
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
' DEALINGS IN THE SOFTWARE.
'
Imports System
Imports System.IO
Imports System.Xml
Imports System.Xml.Serialization
'Imports Microsoft.VisualBasic

Namespace Components
    Public Class DnnChatUser

        Public Sub New()
        End Sub

        Public Sub New(ByVal chatSessionGuid As Guid, ByVal userID As Integer, ByVal nickname As String, ByVal allowedToChat As Boolean)
            Me.ChatSessionGuid = chatSessionGuid
            Me.UserID = userID
            Me.Nickname = nickname
            Me.AllowedToChat = allowedToChat
        End Sub

        Private _chatSessionGuid As Guid = Guid.NewGuid
        Private _userID As Integer = Null.NullInteger
        Private _nickname As String
        Private _JoinedChat As Date = Date.Now
        Private _LastMessageSent As Date
        Private _LastPollingMessage As Date = Date.Now
        Private _allowedToChat As Boolean = False
        Private _personalMessage As String = String.Empty

        Public Property ChatSessionGuid() As Guid
            Get
                Return _chatSessionGuid
            End Get
            Set(ByVal value As Guid)
                _chatSessionGuid = value
            End Set
        End Property

        Public Property UserID() As Integer
            Get
                Return _userID
            End Get
            Set(ByVal value As Integer)
                _userID = value
            End Set
        End Property
        Public Property Nickname() As String
            Get
                Return _nickname
            End Get
            Set(ByVal value As String)
                _nickname = value
            End Set
        End Property
        Public Property JoinedChat() As Date
            Get
                Return _JoinedChat
            End Get
            Set(ByVal value As Date)
                _JoinedChat = value
            End Set
        End Property
        Public Property LastMessageSent() As Date
            Get
                Return _LastMessageSent
            End Get
            Set(ByVal value As Date)
                _LastMessageSent = value
            End Set
        End Property
        Public Property LastPollingMessage() As Date
            Get
                Return _LastPollingMessage
            End Get
            Set(ByVal value As Date)
                _LastPollingMessage = value
            End Set
        End Property
        Public Property AllowedToChat() As Boolean
            Get
                Return _allowedToChat
            End Get
            Set(ByVal value As Boolean)
                _allowedToChat = value
            End Set
        End Property
        Public Property PersonalMessage() As String
            Get
                Return _personalMessage
            End Get
            Set(ByVal value As String)
                _personalMessage = value
            End Set
        End Property
    End Class

End Namespace